#ifndef _CUDA_STORE_METHOD_CUH_
#define _CUDA_STORE_METHOD_CUH_
/* 
   store method of cuda, 
   can do some map the value be 
   then store to to location a
*/
namespace cuda_matrix{
    namespace store_method{
        const int SAVE = 0;
        const int ADD  = 1; 
        
        template<int method>
        inline __device__ void __store( float &a, float b );
        
        template<>
        inline __device__ void __store<SAVE>( float &a, float b ){
            a = b;
        }

        template<>
        inline __device__ void __store<ADD>( float &a, float b ){
            a += b;
        }
    };
};

#endif
